define script CreatureSelection

run script Main

begin script Main
	oTown = get town with id 0
	1Town = get town with id 4
	2Town = get town with id 5
	myTemple = get building ABODE_NUMBER_TEMPLE in oTown min built 1.0
start
	disable load screen
	set fade in time 1
	set toolbar state to MENU_TOOLBAR_STATE_CLOSED
	set player 0 mana 1500
	set player 0 alignment 0.0
	run background script CreatureSelection
	
	// Start AI
	run script bimNewBimbo(oTown)
	run script bimNewBimbo(1Town)
	run script bimNewBimbo(2Town)
	
	enable global influence

	wait until 1 != 1
end script Main



begin script CreatureSelection
          oTown = get town with id 0
          oPen = get building ABODE_NUMBER_CREATURE_PEN in oTown min built 1.0
          ChallengeScroll = create with angle 90 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_COW_STATUE at {1190.24,118.77,1987.63}
          ScrollVis = create visual effect VISUAL_EFFECT_GOLD_SCROLL on ChallengeScroll time -1
          BasePos = marker at {2144.57,14.59,2263.79}
          oCow = create with angle 180 and scale 1.0 SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_COW at {BasePos}+{25,0,0}
          oWolf = create with angle 180 and scale 1.0 SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_WOLF at {BasePos}+{15,0,0}
          oApe = create with angle 180 and scale 1.0 SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_APE at {BasePos}
          oTiger = create with angle 180 and scale 1.0 SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_TIGER at {BasePos}+{-15,0,0}
          oLion = create with angle 180 and scale 1.0 SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_LION at {BasePos}+{-25,0,0}
          oCreature = 0
          CreatureSelected = 0
          CreatureCam = marker at {1218.05,170,2003.65}
start
wait until ChallengeScroll right clicked
stop visual effect ScrollVis
start music "creaturefightmain_01" loop forever
begin cinema
move camera focus to {oApe} time 15
move camera position to {1180.07,140,2136.73} time 20
wait 10 seconds
move camera position to {1422.72,140,2317.12} time 20
wait 15 seconds
move camera position to {1685.64,140,2525.83} time 20
wait 18 seconds
move camera position to {2141.10,35,2318.18} time 20
wait 10 seconds
move camera position to {BasePos}+{0,40,-30} time 20
wait 20 seconds
end cinema
stop music with fadetime 5

begin loop
if oCow left clicked or oCow right clicked
oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_COW at {oPen} using only alignment good neutral
begin cinema
set camera focus to {oPen}
set camera position to {oPen}+{10,30,10}
end cinema
set player 0 creature to oCreature
teach oCreature all
	enable oCreature can learn LA_EAT
	enable oCreature can learn LA_SLEEP
	enable oCreature can learn LA_POO
	enable oCreature can learn LA_STEAL
	enable oCreature can learn LA_WEIGHTLIFT
	enable oCreature can learn LA_GATHER
	enable oCreature can learn LA_BUILD
	enable oCreature can learn LA_PLAY
	enable oCreature can learn LA_WATER
	enable oCreature can learn LA_HEAL
	enable oCreature can learn LA_ATTACK
	enable oCreature can learn LA_SACRIFICE
	enable oCreature can learn LA_EXPLORE
	enable oCreature can learn LA_MAX
        set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0.0
	set oCreature desire CREATURE_DESIRE_TO_LOOK_AROUND to 1.0
	set oCreature disable only desire
	set oCreature desire CREATURE_DESIRE_WANDERLUST to 1.0
	set oCreature desire CREATURE_DESIRE_TO_IMPRESS to 1.0
	set oCreature desire CREATURE_DESIRE_CURIOSITY to 1.0
	set oCreature desire CREATURE_DESIRE_ANGER to 1.0
	set oCreature desire CREATURE_DESIRE_MISCHIEF to 1.0
	set oCreature desire CREATURE_DESIRE_HUNGER to 0.3
        delete oWolf
        delete oCow
        delete oTiger
        delete oApe
        delete oLion
CreatureSelected = 1

elsif oTiger left clicked or oTiger right clicked
oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_TIGER at {oPen} using only alignment good neutral
begin cinema
set camera focus to {oPen}
set camera position to {oPen}+{10,30,10}
end cinema
set player 0 creature to oCreature
teach oCreature all
	enable oCreature can learn LA_EAT
	enable oCreature can learn LA_SLEEP
	enable oCreature can learn LA_POO
	enable oCreature can learn LA_STEAL
	enable oCreature can learn LA_WEIGHTLIFT
	enable oCreature can learn LA_GATHER
	enable oCreature can learn LA_BUILD
	enable oCreature can learn LA_PLAY
	enable oCreature can learn LA_WATER
	enable oCreature can learn LA_HEAL
	enable oCreature can learn LA_ATTACK
	enable oCreature can learn LA_SACRIFICE
	enable oCreature can learn LA_EXPLORE
	enable oCreature can learn LA_MAX
        set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0.0
	set oCreature desire CREATURE_DESIRE_TO_LOOK_AROUND to 1.0
	set oCreature disable only desire
	set oCreature desire CREATURE_DESIRE_WANDERLUST to 1.0
	set oCreature desire CREATURE_DESIRE_TO_IMPRESS to 1.0
	set oCreature desire CREATURE_DESIRE_CURIOSITY to 1.0
	set oCreature desire CREATURE_DESIRE_ANGER to 1.0
	set oCreature desire CREATURE_DESIRE_MISCHIEF to 1.0
	set oCreature desire CREATURE_DESIRE_HUNGER to 0.3
        delete oWolf
        delete oCow
        delete oTiger
        delete oApe
        delete oLion
CreatureSelected = 1

elsif oWolf left clicked or oWolf right clicked
oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_WOLF at {oPen} using only alignment good neutral
begin cinema
set camera focus to {oPen}
set camera position to {oPen}+{10,30,10}
end cinema
set player 0 creature to oCreature
	enable oCreature can learn LA_EAT
	enable oCreature can learn LA_SLEEP
	enable oCreature can learn LA_POO
	enable oCreature can learn LA_STEAL
	enable oCreature can learn LA_WEIGHTLIFT
	enable oCreature can learn LA_GATHER
	enable oCreature can learn LA_BUILD
	enable oCreature can learn LA_PLAY
	enable oCreature can learn LA_WATER
	enable oCreature can learn LA_HEAL
	enable oCreature can learn LA_ATTACK
	enable oCreature can learn LA_SACRIFICE
	enable oCreature can learn LA_EXPLORE
	enable oCreature can learn LA_MAX
        set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0.0
	set oCreature desire CREATURE_DESIRE_TO_LOOK_AROUND to 1.0
	set oCreature disable only desire
	set oCreature desire CREATURE_DESIRE_WANDERLUST to 1.0
	set oCreature desire CREATURE_DESIRE_TO_IMPRESS to 1.0
	set oCreature desire CREATURE_DESIRE_CURIOSITY to 1.0
	set oCreature desire CREATURE_DESIRE_ANGER to 1.0
	set oCreature desire CREATURE_DESIRE_MISCHIEF to 1.0
	set oCreature desire CREATURE_DESIRE_HUNGER to 0.3
        delete oWolf
        delete oCow
        delete oTiger
        delete oApe
        delete oLion
CreatureSelected = 1

elsif oApe left clicked or oApe right clicked
oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_APE at {oPen} using only alignment good neutral
set player 0 creature to oCreature
	enable oCreature can learn LA_EAT
	enable oCreature can learn LA_SLEEP
	enable oCreature can learn LA_POO
	enable oCreature can learn LA_STEAL
	enable oCreature can learn LA_WEIGHTLIFT
	enable oCreature can learn LA_GATHER
	enable oCreature can learn LA_BUILD
	enable oCreature can learn LA_PLAY
	enable oCreature can learn LA_WATER
	enable oCreature can learn LA_HEAL
	enable oCreature can learn LA_ATTACK
	enable oCreature can learn LA_SACRIFICE
	enable oCreature can learn LA_EXPLORE
	enable oCreature can learn LA_MAX
        set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0.0
	set oCreature desire CREATURE_DESIRE_TO_LOOK_AROUND to 1.0
	set oCreature disable only desire
	set oCreature desire CREATURE_DESIRE_WANDERLUST to 1.0
	set oCreature desire CREATURE_DESIRE_TO_IMPRESS to 1.0
	set oCreature desire CREATURE_DESIRE_CURIOSITY to 1.0
	set oCreature desire CREATURE_DESIRE_ANGER to 1.0
	set oCreature desire CREATURE_DESIRE_MISCHIEF to 1.0
	set oCreature desire CREATURE_DESIRE_HUNGER to 0.3
        delete oWolf
        delete oCow
        delete oTiger
        delete oApe
        delete oLion
CreatureSelected = 1

elsif oLion left clicked or oLion right clicked
oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_LION at {oPen} using only alignment good neutral
begin cinema
set camera focus to {oPen}
set camera position to {oPen}+{10,30,10}
end cinema
set player 0 creature to oCreature
	enable oCreature can learn LA_EAT
	enable oCreature can learn LA_SLEEP
	enable oCreature can learn LA_POO
	enable oCreature can learn LA_STEAL
	enable oCreature can learn LA_WEIGHTLIFT
	enable oCreature can learn LA_GATHER
	enable oCreature can learn LA_BUILD
	enable oCreature can learn LA_PLAY
	enable oCreature can learn LA_WATER
	enable oCreature can learn LA_HEAL
	enable oCreature can learn LA_ATTACK
	enable oCreature can learn LA_SACRIFICE
	enable oCreature can learn LA_EXPLORE
	enable oCreature can learn LA_MAX
        set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0.0
	set oCreature desire CREATURE_DESIRE_TO_LOOK_AROUND to 1.0
	set oCreature disable only desire
	set oCreature desire CREATURE_DESIRE_WANDERLUST to 1.0
	set oCreature desire CREATURE_DESIRE_TO_IMPRESS to 1.0
	set oCreature desire CREATURE_DESIRE_CURIOSITY to 1.0
	set oCreature desire CREATURE_DESIRE_ANGER to 1.0
	set oCreature desire CREATURE_DESIRE_MISCHIEF to 1.0
	set oCreature desire CREATURE_DESIRE_HUNGER to 0.3
        delete oWolf
        delete oCow
        delete oTiger
        delete oApe
        delete oLion
CreatureSelected = 1
else
CreatureSelected = 0
end if
until CreatureSelected == 1
end loop
end script CreatureSelection
